﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessObject;

namespace GreenLife.Admin
{
    public partial class ThemHoaDon : System.Web.UI.Page
    {
        OrderBO oBO = new OrderBO();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                if (oBO.createOrder(Int32.Parse(txtCusId.Text), Int32.Parse(txtSubId.Text), txtDate.Text))
                {
                    Response.Redirect("DanhSachHoaDon.aspx");
                }
                else
                {
                    Response.Redirect("error.aspx");
                }

            }
            catch (Exception ex)
            {
                Response.Redirect("error.aspx");
            }
        }
    }
}